echo "Preparing..."
mv ~/MCServer ~/MCServerBackup
rm -rf /tmp/mac-builds/mc-server
mkdir -p /tmp/mac-builds/mc-server
cd /tmp/mac-builds/mc-server
echo "Checking out from SVN..."
svn checkout http://mc-server.googlecode.com/svn/trunk/ mc-server
echo "Preparing build..."
cd mc-server
rm CryptoPP/sosemanuk.h
rm CryptoPP/sosemanuk.cpp
rm CryptoPP/salsa.cpp
rm CryptoPP/salsa.h
echo "Building..."
make release=1
echo "Setting up..."
cp -r MCServer ~/MCServer
cd ~/
rm -rf /tmp/mac-builds/mc-server
echo "Done. MCServer is now in your home directory."
